#ifndef FUSE_SERVER_H
#define FUSE_SERVER_H

#include <utility>
#include <string>
#include <unordered_map>

#define REMOVE_SHARE_SUCCESS 0
#define ERROR_REMOVE_SHARE_IN_USE 1
#define ERROR_REMOVE_SHARE_NOT_FOUND 2

typedef std::unordered_map<std::string, std::string> FileShareList;

class IFSL {
public:
    virtual bool StartServer(int portNum) = NULL;
    virtual void Release() = NULL;

    virtual bool AddFileList(
        const std::string& shareName,
        const FileShareList& shareList,
        uint64_t addTimeStamp, bool hidden, bool readOnly) = NULL;
    virtual int RemoveShare(const std::string& shareName, bool force) = NULL;

    virtual bool GetLastAccessTime(const std::string& shareName, uint64_t& timeStamp) = NULL;

    virtual HANDLE GetTransportHandle() = NULL;
    virtual void SetPeerReconnect(bool isReconnect) = NULL;
};

#if defined(FSL_STATIC)
#define FSLAPI
#define APIENTSPEC
extern "C" FSLAPI IFSL* APIENTSPEC GetFSL();
#endif

#endif // FUSE_SERVER_H